<?php
use yii\helpers\Html;
use yii\helpers\Url;
use app\lib\WeixinUtils;

/* @var $this yii\web\View */
/* @var $content string 字符串 */


$web = Url::to("@web");

?>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>我的团队</title>
    <link href="<?=$web?>/css/fx/team.css" rel="stylesheet" type="text/css">
    <link href="<?=$web?>/css/fx/global.css" rel="stylesheet" type="text/css">
    <script src="<?=$web?>/js/jquery.js"></script>
    <script src="<?=$web?>/js/tools.js"></script>
    <script>
        $(function ($) {
            var w = $(document).width();
            if (w > 640) {
                w = 640;
            }
            $("html").css("font-size", w * 20 / 320);

            loadRList();
            $(document).scroll(function () {
                var scrollTop = $(this).scrollTop();
                var scrollHeight = $(window).height();
                var contentHeight = $(this).height();
               // alert(scrollTop+"="+scrollHeight+"="+contentHeight);
                if (scrollTop + scrollHeight >= contentHeight) {
             // alert(1);
                    loadRList();
                }
            });
        });
        myShare=function(){

            window.location.href = "<?=Url::to(["wx-fx/my-share"]);?>" ;
        };
        var start = 0;
        var pagesize=10;

        var teamList_tpl=returnstring('<?=$web?>/js/fx/teamList.tpl');
        function loadRList() {

            var data = {};
            data.start = start;
            data.pagesize = pagesize;


            var re = returnjson("<?=Url::to(['wx-fx/get-team-list-handle'])?>", data);

            if (re.flag == 0) {
                alert(re.msg);
                return;
            } else {
                var target = $(".content");
                    $.each(re.cUserList, function (i, item) {
                        var dom = document.createElement("div");
                        dom.innerHTML = teamList_tpl._format({

                            HEADER_URL: item.HEADER_URL,
                            NICK_NAME: item.NICK_NAME,
                            CREATE_DATETIME: item.CREATE_DATETIME

                        });
                        target.get(0).appendChild(dom);
                    });
                start = start + re.cUserList.length;

            }

        }
    </script>
</head>
<body>
<div class="head">
    <div class="head_left">
        <div class="left_title">
            <span>我的团队人数</span>
        </div>
        <div class="left_number">
            <span><?=$teamCount?></span>
        </div>
    </div>
    <div class="head_right" onclick="myShare();">
        <div class="right_title">
            <span>邀请团队成员</span>
        </div>
        <div class="right_img">
            <img src="<?=$web?>/img/fx/team1.png">
        </div>
    </div>
</div>
<div class="division_hr"></div>
<div class="content">
   <!-- <div class="content_board">
        <div class="content_user">
            <div class="user_left">
                <div class="user_img"><img src="<?/*=$web*/?>/img/fx/invitation_2.png"></div>
            </div>
            <div class="user_right">
                <div class="user_right_top">
                    <div class="right_name">
                        <span>曾大锤</span>
                    </div>
                    <div class="right_state">
                        <span>已加入</span>
                    </div>
                </div>
                <div class="user_right_bottom">
                    <div class="right_time">
                        <span>17：36</span>
                    </div>
                    <div class="right_date">
                        <span>2016-02-01</span>
                    </div>
                </div>
            </div>
        </div>
    </div>-->




</div>
</body>
</html>